<template>
  <div  >
    <el-carousel :interval="4000" type="card" height="200px">
      <el-carousel-item v-for="item in 6" :key="item">
        <h3 class="medium">{{ item }}</h3>
      </el-carousel-item>
    </el-carousel>
  </div>

</template>




<script>


export default {
  name: "home",
  data() {
    return {
      userName:"",
      loginUser: {
        id: "",
        userName: "",
        passWord: "",
        name: "",
        gender: "",
        age: "",
        phone: "",
        address: "",
        type: 2,
        status: 1,
      },
      //系统通知
      notices:[],
    };
  },
  methods:{
    //获取个人资料
    getLoginUser(){
      const _self = this
      _self.$http.get("/api/userInfo/"+_self.userName)
        .then(function (resp) {
          // console.log(resp.data.data)
          _self.loginUser = resp.data.data
        })
    },
    //获取系统通知
    getNotices(){
      const _self = this
      _self.$http.get("/api/notices")
        .then(function (resp) {
          _self.notices = resp.data.data
        })
    }
  },
  // mounted() {
  //   this.userName = sessionStorage.getItem("username")
  //   //显示个人信息
  //   this.getLoginUser()
  //   //显示系统通知
  //   this.getNotices()
  //   }
};
</script>

<style>
.fater-body-show .el-card{
  margin-bottom: 15px;
}
.fater-body-show .el-card__header{
  padding: 10px 10px;
}
.fater-body-show .el-card__body{
  padding: 10px 15px;
}
.notice-head{
  font-size: 16px;
  line-height: 28px;
  margin-bottom: 15px;
}
.notice-p{
  font-size: 14px;
  line-height: 28px;
}



.el-carousel__item h3 {
  color: #475669;
  font-size: 14px;
  opacity: 0.75;
  line-height: 200px;
  margin: 0;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n+1) {
  background-color: #d3dce6;
}

</style>


